<%= form_for(@form, html: {class: 'form-horizontal', role: 'form', id: 'system_user_form'}) do |f| %>
    <div class="form-group">
        <%= f.label :name, '账号名 *', class: 'col-sm-2 control-label' %>
        <div class="col-sm-10">
            <%= f.text_field :name, class: 'form-control', 'data-bv-notempty' => true %>
        </div>
    </div>
    <div class="form-group">
        <%= f.label :real_name, '姓名 *', class: 'col-sm-2 control-label' %>
        <div class="col-sm-10">
            <%= f.text_field :real_name, class: 'form-control', 'data-bv-notempty' => true %>
        </div>
    </div>
    <div class="form-group">
        <%= f.label :password, '密码', class: 'col-sm-2 control-label' %>
        <div class="col-sm-10">
            <%= f.password_field :password, class: 'form-control', 'data-bv-notempty' => !@form.model.persisted?%>
        </div>
    </div>
    <div class="form-group">
        <%= f.label :role_name, '角色', class: 'col-sm-2 control-label' %>
        <div class="col-sm-10">
            <%= f.select(:role_name, options_for_select({
                                                                '销售助理' => Users::SystemUser::SALES_ASSIST,
                                                                '普通用户' => Users::SystemUser::NORMAL_USER,
                                                                '部门经理' => Users::SystemUser::DEPT_MANAGER
                                                        }), {}, class: 'form-control') %>
        </div>
    </div>
    <div class="form_footer">
        <a class="btn btn-default" href="<%= request.referrer %>">返回</a>
        <button type="reset" class="btn btn-danger">重置</button>
        <button type="submit" class="btn btn-success"><i class="fa fa-check"></i> 提交</button>
    </div>
<% end %>
